package cn.kgc.ssm.handler;

import cn.kgc.ssm.util.ResponseResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author 课工场
 * @date 2023/10/23
 * @description 全局异常处理类
 */
@RestControllerAdvice
public class GlobalExceptionHandler {


    @ExceptionHandler(Exception.class)
    public ResponseResult exceptionHandler(Exception e){

        e.printStackTrace();
        return ResponseResult.fail();
    }



}
